package com.chixing.day12_date_factory.factory;

public class phoneFactory {
    public Phone getPhone(String phoneBrand){
        Phone phone = null;
        switch (phoneBrand){
            case "huawei": phone = new HuaweiPhone();break;
            case "oppo": phone = new OppoPhone();break;
            case "vivo": phone = new VivoPhone();break;
            default:phone = null;break;
        }
        return phone;
    }
}
